/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.trabalho;

import java.io.BufferedReader;
import java.io.FileReader;
import java.util.ArrayList;
import java.util.List;
import java.util.StringTokenizer;

/**
 *
 * @author Antonio Mourão
 */
public class File {
    
    public static List<String> readFile(String path) {  
        
      String linha = null;
      List<String> lista = null;
      try {  
          
         FileReader reader = new FileReader(path);  
         BufferedReader leitor = new BufferedReader(reader);  
         lista = new ArrayList();
         
         while((linha = leitor.readLine()) != null) {
             lista.add(linha);
         }  
  
         leitor.close();  
         reader.close();  
  
      } catch (Exception e) {  
         e.printStackTrace();  
      }
      
      return lista;
   }  
}
